---
displayed_sidebar: "English"
---

# Function list

StarRocks offers a rich set of functions to facilitate data queries and analysis. In addition to commonly used functions, StarRocks supports semi-structured functions such as ARRAY, JSON, MAP, and STRUCT functions. It also supports higher-order [Lambda functions](Lambda_expression.md). If these functions cannot meet your business requirements, you can use [Java UDF](JAVA_UDF.md) to compile functions.

You can find a function based on the following categories:

- [Function list](#function-list)
  - [Aggregate functions](#aggregate-functions)
  - [Array functions](#array-functions)
  - [Binary functions](#binary-functions)
  - [Bit functions](#bit-functions)
  - [Bitmap functions](#bitmap-functions)
  - [Conditional functions](#conditional-functions)
  - [Cryptographic functions](#cryptographic-functions)
  - [Date functions](#date-functions)
  - [Geographic functions](#geographic-functions)
  - [Hash functions](#hash-functions)
  - [JSON functions](#json-functions)
  - [String functions](#string-functions)
  - [Map functions](#map-functions)
  - [Math functions](#math-functions)
  - [Pattern matching functions](#pattern-matching-functions)
  - [Percentile functions](#percentile-functions)
  - [Scalar functions](#scalar-functions)
  - [Struct functions](#struct-functions)
  - [Table functions](#table-functions)
  - [Utility functions](#utility-functions)

## Aggregate functions

- [any_value](./aggregate-functions/any_value.md)
- [approx_count_distinct](./aggregate-functions/approx_count_distinct.md)
- [array_agg](./array-functions/array_agg.md)
- [avg](./aggregate-functions/avg.md)
- [bitmap](./aggregate-functions/bitmap.md)
- [bitmap_agg](./bitmap-functions/bitmap_agg.md)
- [corr](./aggregate-functions/corr.md)
- [covar_pop](./aggregate-functions/covar_pop.md)
- [covar_samp](./aggregate-functions/covar_samp.md)
- [count](./aggregate-functions/count.md)
- [count_if](./aggregate-functions/count_if.md)
- [group_concat](./aggregate-functions/group_concat.md)
- [grouping](./aggregate-functions/grouping.md)
- [grouping_id](./aggregate-functions/grouping_id.md)
- [hll_empty](./aggregate-functions/hll_empty.md)
- [hll_hash](./aggregate-functions/hll_hash.md)
- [hll_raw_agg](./aggregate-functions/hll_raw_agg.md)
- [hll_union](./aggregate-functions/hll_union.md)
- [hll_union_agg](./aggregate-functions/hll_union_agg.md)
- [max](./aggregate-functions/max.md)
- [max_by](./aggregate-functions/max_by.md)
- [min](./aggregate-functions/min.md)
- [min_by](./aggregate-functions/min_by.md)
- [multi_distinct_sum](./aggregate-functions/multi_distinct_sum.md)
- [multi_distinct_count](./aggregate-functions/multi_distinct_count.md)
- [percentile_approx](./aggregate-functions/percentile_approx.md)
- [percentile_cont](./aggregate-functions/percentile_cont.md)
- [percentile_disc](./aggregate-functions/percentile_disc.md)
- [retention](./aggregate-functions/retention.md)
- [stddev，stddev_pop](./aggregate-functions/stddev.md)
- [stddev_samp](./aggregate-functions/stddev_samp.md)
- [sum](./aggregate-functions/sum.md)
- [variance, variance_pop, var_pop](./aggregate-functions/variance.md)
- [var_samp](./aggregate-functions/var_samp.md)
- [window_funnel](./aggregate-functions/window_funnel.md)

## Array functions

- [all_match](./array-functions/all_match.md)
- [any_match](./array-functions/any_match.md)
- [array_agg](./array-functions/array_agg.md)
- [array_append](./array-functions/array_append.md)
- [array_avg](./array-functions/array_avg.md)
- [array_concat](./array-functions/array_concat.md)
- [array_contains](./array-functions/array_contains.md)
- [array_contains_all](./array-functions/array_contains_all.md)
- [array_contains_seq](./array-functions/array_contains_seq.md)
- [array_cum_sum](./array-functions/array_cum_sum.md)
- [array_difference](./array-functions/array_difference.md)
- [array_distinct](./array-functions/array_distinct.md)
- [array_filter](./array-functions/array_filter.md)
- [array_generate](./array-functions/array_generate.md)
- [array_intersect](./array-functions/array_intersect.md)
- [array_join](./array-functions/array_join.md)
- [array_length](./array-functions/array_length.md)
- [array_map](./array-functions/array_map.md)
- [array_max](./array-functions/array_max.md)
- [array_min](./array-functions/array_min.md)
- [array_position](./array-functions/array_position.md)
- [array_remove](./array-functions/array_remove.md)
- [array_slice](./array-functions/array_slice.md)
- [array_sort](./array-functions/array_sort.md)
- [array_sortby](./array-functions/array_sortby.md)
- [array_sum](./array-functions/array_sum.md)
- [arrays_overlap](./array-functions/arrays_overlap.md)
- [array_to_bitmap](./array-functions/array_to_bitmap.md)
- [array_unique_agg](./array-functions/array_unique_agg.md)
- [cardinality](./array-functions/cardinality.md)
- [element_at](./array-functions/element_at.md)
- [reverse](./array-functions/reverse.md)
- [unnest](./array-functions/unnest.md)

## Binary functions

- [to_binary](./binary-functions/to_binary.md)
- [from_binary](./binary-functions/from_binary.md)

## Bit functions

- [bitand](./bit-functions/bitand.md)
- [bitnot](./bit-functions/bitnot.md)
- [bitor](./bit-functions/bitor.md)
- [bitxor](./bit-functions/bitxor.md)
- [bit_shift_left](./bit-functions/bit_shift_left.md)
- [bit_shift_right](./bit-functions/bit_shift_right.md)
- [bit_shift_right_logical](./bit-functions/bit_shift_right_logical.md)

## Bitmap functions

- [base64_to_bitmap](./bitmap-functions/base64_to_bitmap.md)
- [bitmap_agg](./bitmap-functions/bitmap_agg.md)
- [bitmap_and](./bitmap-functions/bitmap_and.md)
- [bitmap_andnot](./bitmap-functions/bitmap_andnot.md)
- [bitmap_contains](./bitmap-functions/bitmap_contains.md)
- [bitmap_count](./bitmap-functions/bitmap_count.md)
- [bitmap_from_binary](./bitmap-functions/bitmap_from_binary.md)
- [bitmap_from_string](./bitmap-functions/bitmap_from_string.md)
- [bitmap_empty](./bitmap-functions/bitmap_empty.md)
- [bitmap_has_any](./bitmap-functions/bitmap_has_any.md)
- [bitmap_hash](./bitmap-functions/bitmap_hash.md)
- [bitmap_intersect](./bitmap-functions/bitmap_intersect.md)
- [bitmap_max](./bitmap-functions/bitmap_max.md)
- [bitmap_min](./bitmap-functions/bitmap_min.md)
- [bitmap_or](./bitmap-functions/bitmap_or.md)
- [bitmap_remove](./bitmap-functions/bitmap_remove.md)
- [bitmap_to_array](./bitmap-functions/bitmap_to_array.md)
- [bitmap_to_base64](./bitmap-functions/bitmap_to_base64.md)
- [bitmap_to_binary](./bitmap-functions/bitmap_to_binary.md)
- [bitmap_to_string](./bitmap-functions/bitmap_to_string.md)
- [bitmap_union](./bitmap-functions/bitmap_union.md)
- [bitmap_union_count](./bitmap-functions/bitmap_union_count.md)
- [bitmap_union_int](./bitmap-functions/bitmap_union_int.md)
- [bitmap_xor](./bitmap-functions/bitmap_xor.md)
- [intersect_count](./bitmap-functions/intersect_count.md)
- [subdivide_bitmap](./bitmap-functions/subdivide_bitmap.md)
- [sub_bitmap](./bitmap-functions/sub_bitmap.md)
- [to_bitmap](./bitmap-functions/to_bitmap.md)
- [unnest_bitmap](./bitmap-functions/unnest_bitmap.md)

## Conditional functions

- [case](./condition-functions/case_when.md)
- [coalesce](./condition-functions/coalesce.md)
- [if](./condition-functions/if.md)
- [ifnull](./condition-functions/ifnull.md)
- [nullif](./condition-functions/nullif.md)

## Cryptographic functions

- [aes_encrypt](./crytographic-functions/aes_encrypt.md)
- [aes_decrypt](./crytographic-functions/aes_decrypt.md)
- [base64_decode_binary](./crytographic-functions/base64_decode_binary.md)
- [base64_decode_string](./crytographic-functions/base64_decode_string.md)
- [from_base64](./crytographic-functions/from_base64.md)
- [md5](./crytographic-functions/md5.md)
- [md5sum](./crytographic-functions/md5sum.md)
- [md5sum_numeric](./crytographic-functions/md5sum_numeric.md)
- [sha2](./crytographic-functions/sha2.md)
- [sm3](./crytographic-functions/sm3.md)
- [to_base64](./crytographic-functions/from_base64.md)

## Date functions

- [add_months](./date-time-functions/add_months.md)
- [adddate](./date-time-functions/adddate.md)
- [convert_tz](./date-time-functions/convert_tz.md)
- [current_date，curdate](./date-time-functions/curdate.md)
- [current_time，curtime](./date-time-functions/curtime.md)
- [current_timestamp](./date-time-functions/current_timestamp.md)
- [date](./date-time-functions/date.md)
- [date_add, adddate](./date-time-functions/date_add.md)
- [date_diff](./date-time-functions/date_diff.md)
- [date_format](./date-time-functions/date_format.md)
- [date_slice](./date-time-functions/date_slice.md)
- [date_sub, subdate](./date-time-functions/date_sub.md)
- [date_trunc](./date-time-functions/date_trunc.md)
- [datediff](./date-time-functions/datediff.md)
- [day](./date-time-functions/day.md)
- [dayofweek_iso](./date-time-functions/day_of_week_iso.md)
- [dayname](./date-time-functions/dayname.md)
- [dayofmonth](./date-time-functions/dayofmonth.md)
- [dayofweek](./date-time-functions/dayofweek.md)
- [dayofyear](./date-time-functions/dayofyear.md)
- [days_add](./date-time-functions/days_add.md)
- [days_diff](./date-time-functions/days_diff.md)
- [days_sub](./date-time-functions/days_sub.md)
- [from_days](./date-time-functions/from_days.md)
- [from_unixtime](./date-time-functions/from_unixtime.md)
- [hour](./date-time-functions/hour.md)
- [hours_add](./date-time-functions/hours_add.md)
- [hours_diff](./date-time-functions/hours_diff.md)
- [hours_sub](./date-time-functions/hours_sub.md)
- [jodatime_format](./date-time-functions/jodatime_format.md)
- [last_day](./date-time-functions/last_day.md)
- [makedate](./date-time-functions/makedate.md)
- [microseconds_add](./date-time-functions/microseconds_add.md)
- [microseconds_sub](./date-time-functions/microseconds_sub.md)
- [minute](./date-time-functions/minute.md)
- [minutes_add](./date-time-functions/minutes_add.md)
- [minutes_diff](./date-time-functions/minutes_diff.md)
- [minutes_sub](./date-time-functions/minutes_sub.md)
- [month](./date-time-functions/month.md)
- [monthname](./date-time-functions/monthname.md)
- [months_add](./date-time-functions/months_add.md)
- [months_diff](./date-time-functions/months_diff.md)
- [months_sub](./date-time-functions/months_sub.md)
- [next_day](./date-time-functions/next_day.md)
- [now](./date-time-functions/now.md)
- [previous_day](./date-time-functions/previous_day.md)
- [quarter](./date-time-functions/quarter.md)
- [second](./date-time-functions/second.md)
- [seconds_add](./date-time-functions/seconds_add.md)
- [seconds_diff](./date-time-functions/seconds_diff.md)
- [seconds_sub](./date-time-functions/seconds_sub.md)
- [str2date](./date-time-functions/str2date.md)
- [str_to_date](./date-time-functions/str_to_date.md)
- [str_to_jodatime](./date-time-functions/str_to_jodatime.md)
- [time_slice](./date-time-functions/time_slice.md)
- [time_to_sec](./date-time-functions/time_to_sec.md)
- [timediff](./date-time-functions/timediff.md)
- [timestamp](./date-time-functions/timestamp.md)
- [timestampadd](./date-time-functions/timestampadd.md)
- [timestampdiff](./date-time-functions/timestampdiff.md)
- [to_date](./date-time-functions/to_date.md)
- [to_days](./date-time-functions/to_days.md)
- [to_iso8601](./date-time-functions/to_iso8601.md)
- [to_tera_date](./date-time-functions/to_tera_date.md)
- [to_tera_timestamp](./date-time-functions/to_tera_timestamp.md)
- [unix_timestamp](./date-time-functions/unix_timestamp.md)
- [utc_timestamp](./date-time-functions/utc_timestamp.md)
- [week](./date-time-functions/week.md)
- [week_iso](./date-time-functions/week_iso.md)
- [weekofyear](./date-time-functions/weekofyear.md)
- [weeks_add](./date-time-functions/weeks_add.md)
- [weeks_diff](./date-time-functions/weeks_diff.md)
- [weeks_sub](./date-time-functions/weeks_sub.md)
- [year](./date-time-functions/year.md)
- [years_add](./date-time-functions/years_add.md)
- [years_diff](./date-time-functions/years_diff.md)
- [years_sub](./date-time-functions/years_sub.md)

## Geographic functions

- [ST_AsText, ST_AsWKT](./spatial-functions/st_astext.md)
- [st_circle](./spatial-functions/st_circle.md)
- [st_contains](./spatial-functions/st_contains.md)
- [st_distance_sphere](./spatial-functions/st_distance_sphere.md)
- [st_geometryfromtext](./spatial-functions/st_geometryfromtext.md)
- [st_linefromtext, ST_LineStringFromText](./spatial-functions/st_linefromtext.md)
- [st_point](./spatial-functions/st_point.md)
- [st_polygon](./spatial-functions/st_polygon.md)
- [st_x](./spatial-functions/st_x.md)
- [st_y](./spatial-functions/st_y.md)

## Hash functions

- [murmur_hash3_32](./hash-functions/murmur_hash3_32.md)
- [xx_hash3_64](./hash-functions/xx_hash3_64.md)

## JSON functions

- [json_array](./json-functions/json-constructor-functions/json_array.md)
- [json_object](./json-functions/json-constructor-functions/json_object.md)
- [parse_json](./json-functions/json-constructor-functions/parse_json.md)
- [Arrow function](./json-functions/json-query-and-processing-functions/arrow-function.md)
- [cast](./json-functions/json-query-and-processing-functions/cast.md)
- [get_json_double](./json-functions/json-query-and-processing-functions/get_json_double.md)
- [get_json_int](./json-functions/json-query-and-processing-functions/get_json_int.md)
- [get_json_string, get_json_object](./json-functions/json-query-and-processing-functions/get_json_string.md)
- [json_each](./json-functions/json-query-and-processing-functions/json_each.md)
- [json_exists](./json-functions/json-query-and-processing-functions/json_exists.md)
- [json_length](./json-functions/json-query-and-processing-functions/json_length.md)
- [json_keys](./json-functions/json-query-and-processing-functions/json_keys.md)
- [json_query](./json-functions/json-query-and-processing-functions/json_query.md)
- [json_string](./json-functions/json-query-and-processing-functions/json_string.md)
- [to_json](./json-functions/json-query-and-processing-functions/to_json.md)

## String functions

- [append_trailing_char_if_absent](./string-functions/append_trailing_char_if_absent.md)
- [ascii](./string-functions/ascii.md)
- [char](./string-functions/char.md)
- [char_length](./string-functions/char_length.md)
- [character_length](./string-functions/character_length.md)
- [concat](./string-functions/concat.md)
- [concat_ws](./string-functions/concat_ws.md)
- [crc32](./string-functions/crc32.md)
- [ends_with](./string-functions/ends_with.md)
- [find_in_set](./string-functions/find_in_set.md)
- [group_concat](./string-functions/group_concat.md)
- [hex](./string-functions/hex.md)
- [hex_decode_binary](./string-functions/hex_decode_binary.md)
- [hex_decode_string](./string-functions/hex_decode_string.md)
- [instr](./string-functions/instr.md)
- [lcase](./string-functions/lcase.md)
- [left](./string-functions/left.md)
- [length](./string-functions/length.md)
- [locate](./string-functions/locate.md)
- [lower](./string-functions/lower.md)
- [lpad](./string-functions/lpad.md)
- [ltrim](./string-functions/ltrim.md)
- [money_format](./string-functions/money_format.md)
- [null_or_empty](./string-functions/null_or_empty.md)
- [parse_url](./string-functions/parse_url.md)
- [repeat](./string-functions/repeat.md)
- [replace](./string-functions/replace.md)
- [reverse](./string-functions/reverse.md)
- [right](./string-functions/right.md)
- [rpad](./string-functions/rpad.md)
- [rtrim](./string-functions/rtrim.md)
- [space](./string-functions/space.md)
- [split](./string-functions/split.md)
- [split_part](./string-functions/split_part.md)
- [starts_with](./string-functions/starts_with.md)
- [strleft](./string-functions/strleft.md)
- [strright](./string-functions/strright.md)
- [str_to_map](./string-functions/str_to_map.md)
- [substr, substring](./string-functions/substring.md)
- [substring_index](./string-functions/substring_index.md)
- [translate](./string-functions/translate.md)
- [trim](./string-functions/trim.md)
- [ucase](./string-functions/ucase.md)
- [unhex](./string-functions/unhex.md)
- [upper](./string-functions/upper.md)
- [url_decode](./string-functions/url_decode.md)
- [url_encode](./string-functions/url_encode.md)
- [url_extract_parameter](./string-functions/url_extract_parameter.md)

## Map functions

- [cardinality](./map-functions/cardinality.md)
- [distinct_map_keys](./map-functions/distinct_map_keys.md)
- [element_at](./map-functions/element_at.md)
- [map_apply](./map-functions/map_apply.md)
- [map_concat](./map-functions/map_concat.md)
- [map_filter](./map-functions/map_filter.md)
- [map_from_arrays](./map-functions/map_from_arrays.md)
- [map_keys](./map-functions/map_keys.md)
- [map_size](./map-functions/map_size.md)
- [map_values](./map-functions/map_values.md)
- [transform_keys](./map-functions/transform_keys.md)
- [transform_values](./map-functions/transform_values.md)

## Math functions

- [abs](./math-functions/abs.md)
- [acos](./math-functions/acos.md)
- [asin](./math-functions/asin.md)
- [atan](./math-functions/atan.md)
- [atan2](./math-functions/atan2.md)
- [bin](./math-functions/bin.md)
- [ceil, dceil](./math-functions/ceil.md)
- [ceiling](./math-functions/ceiling.md)
- [conv](./math-functions/conv.md)
- [cos](./math-functions/cos.md)
- [cosh](./math-functions/cosh.md)
- [cosine_similarity](./math-functions/cos_similarity.md)
- [cosine_similarity_norm](./math-functions/cos_similarity_norm.md)
- [cot](./math-functions/cot.md)
- [degrees](./math-functions/degrees.md)
- [divide](./math-functions/divide.md)
- [e](./math-functions/e.md)
- [expexp, dexp](./math-functions/exp.md)
- [floor, dfloor](./math-functions/floor.md)
- [fmod](./math-functions/fmod.md)
- [greatest](./math-functions/greatest.md)
- [least](./math-functions/least.md)
- [ln, dlog1, log](./math-functions/ln.md)
- [log](./math-functions/log.md)
- [log2](./math-functions/log2.md)
- [log10, dlog10](./math-functions/log10.md)
- [mod](./math-functions/mod.md)
- [multiply](./math-functions/multiply.md)
- [negative](./math-functions/negative.md)
- [pi](./math-functions/pi.md)
- [pmod](./math-functions/pmod.md)
- [positive](./math-functions/positive.md)
- [pow, power, dpow, fpow](./math-functions/pow.md)
- [radians](./math-functions/radians.md)
- [rand, random](./math-functions/rand.md)
- [round, dround](./math-functions/round.md)
- [sign](./math-functions/sign.md)
- [sin](./math-functions/sin.md)
- [sinh](./math-functions/sinh.md)
- [sqrt, dsqrt](./math-functions/sqrt.md)
- [square](./math-functions/square.md)
- [tan](./math-functions/tan.md)
- [tanh](./math-functions/tanh.md)
- [truncate](./math-functions/truncate.md)

## Pattern matching functions

- [like](./like-predicate-functions/like.md)
- [regexp](./like-predicate-functions/regexp.md)
- [regexp_extract](./like-predicate-functions/regexp_extract.md)
- [regexp_extract_all](./like-predicate-functions/regexp_extract_all.md)
- [regexp_replace](./like-predicate-functions/regexp_replace.md)

## Percentile functions

- [percentile_approx_raw](./percentile-functions/percentile_approx_raw.md)
- [percentile_empty](./percentile-functions/percentile_empty.md)
- [percentile_hash](./percentile-functions/percentile_hash.md)
- [percentile_union](./percentile-functions/percentile_union.md)

## Scalar functions

- [hll_cardinality](./scalar-functions/hll_cardinality.md)

## Struct functions

- [named_struct](./struct-functions/named_struct.md)
- [row](./struct-functions/row.md)

## Table functions

- [files](./table-functions/files.md)
- [generate_series](./table-functions/generate_series.md)
- [json_each](./json-functions/json-query-and-processing-functions/json_each.md)
- [subdivide_bitmap](./bitmap-functions/subdivide_bitmap.md)
- [unnest](./array-functions/unnest.md)
- [unnest_bitmap](./bitmap-functions/unnest_bitmap.md)

## Utility functions

- [catalog](./utility-functions/catalog.md)
- [current_role](./utility-functions/current_role.md)
- [current_version](./utility-functions/current_version.md)
- [database](./utility-functions/database.md)
- [get_query_profile](./utility-functions/get_query_profile.md)
- [host_name](./utility-functions/host_name.md)
- [isnull](./utility-functions/isnull.md)
- [isnotnull](./utility-functions/isnotnull.md)
- [is_role_in_session](./utility-functions/is_role_in_session.md)
- [last_query_id](./utility-functions/last_query_id.md)
- [sleep](./utility-functions/sleep.md)
- [uuid](./utility-functions/uuid.md)
- [uuid_numeric](./utility-functions/uuid_numeric.md)
- [version](./utility-functions/version.md)
